package avicit.bdp.dgs.metadata.dto;

import avicit.bdp.common.base.BaseDTO;
import avicit.platform6.core.annotation.log.FieldRemark;
import avicit.platform6.core.annotation.log.LogField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.Column;
import javax.persistence.Table;

import org.apache.commons.lang3.StringUtils;

/**
 * 元数据编辑暂存表
 *
 * @author mayi
 */
@ApiModel(value = "MetadataTmpDTO", description = "bdp_dgs_metadata_tmp")
@Table(name = "bdp_dgs_metadata_tmp")
public class MetadataTmpDTO extends BaseDTO {
  private static final long serialVersionUID = 1L;

  /** 主键ID */
  @LogField
  @ApiModelProperty(value = "主键")
  @FieldRemark(column = "id", field = "id", name = "主键")
  @Column(name = "id")
  @avicit.platform6.core.annotation.log.Id
  @javax.persistence.Id
  private String id;

  /** 元数据ID */
  @ApiModelProperty(value = "元数据ID", name = "metadataId")
  @FieldRemark(column = "metadata_id", field = "metadataId", name = "元数据ID")
  private String metadataId;

  /** 元数据版本 */
  @ApiModelProperty(value = "元数据版本", name = "metadataVersion")
  @FieldRemark(column = "metadata_version", field = "metadataVersion", name = "元数据版本")
  private String metadataVersion;

  /** 英文名称 */
  @LogField
  @ApiModelProperty(value = "英文名称", name = "name")
  @FieldRemark(column = "name", field = "name", name = "英文名称")
  private String name;

  /** 中文名称 */
  @ApiModelProperty(value = "中文名称", name = "cnName")
  @FieldRemark(column = "cn_name", field = "cnName", name = "中文名称")
  private String cnName;

  /** 备注 */
  @ApiModelProperty(value = "备注", name = "remark")
  @FieldRemark(column = "remark", field = "remark", name = "备注")
  private String remark;

  /** 所属分类 */
  @ApiModelProperty(value = "所属分类", name = "typeId")
  @FieldRemark(column = "type_id", field = "typeId", name = "所属分类")
  private String typeId;

  /** 分层ID */
  @ApiModelProperty(value = "分层ID", name = "layerId")
  @FieldRemark(column = "layer_id", field = "layerId", name = "分层ID")
  private String layerId;

  /** 数据源ID */
  @ApiModelProperty(value = "数据源ID", name = "dataSourceId")
  @FieldRemark(column = "datasource_id", field = "dataSourceId", name = "数据源ID")
  @Column(name = "datasource_id")
  private String dataSourceId;

  /** 数据源类型 */
  @ApiModelProperty(value = "数据源类型", name = "dataSourceType")
  @FieldRemark(column = "datasource_type", field = "dataSourceType", name = "数据源类型")
  @Column(name = "datasource_type")
  private String dataSourceType;

  /** 存储组 */
  @ApiModelProperty(value = " 存储组", name = "storageGroup")
  @FieldRemark(column = "storage_group", field = "storageGroup", name = " 存储组")
  private String storageGroup;

  /** 存储格式 */
  @ApiModelProperty(value = " 存储格式", name = "dataStorageFormat")
  @FieldRemark(column = "data_storage_format", field = "dataStorageFormat", name = " 存储格式")
  private String dataStorageFormat;

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getMetadataId() {
    return metadataId;
  }

  public void setMetadataId(String metadataId) {
    this.metadataId = metadataId;
  }

  public String getMetadataVersion() {
    return metadataVersion;
  }

  public void setMetadataVersion(String metadataVersion) {
    this.metadataVersion = metadataVersion;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getCnName() {
    return cnName;
  }

  public void setCnName(String cnName) {
    this.cnName = cnName;
  }

  public String getRemark() {
    return remark;
  }

  public void setRemark(String remark) {
    this.remark = remark;
  }

  public String getTypeId() {
    return typeId;
  }

  public void setTypeId(String typeId) {
    this.typeId = typeId;
  }

  public String getLayerId() {
    return layerId;
  }

  public void setLayerId(String layerId) {
    this.layerId = layerId;
  }

  public String getDataSourceId() {
    return dataSourceId;
  }

  public void setDataSourceId(String dataSourceId) {
    this.dataSourceId = dataSourceId;
  }

  public String getDataSourceType() {
    return dataSourceType;
  }

  public void setDataSourceType(String dataSourceType) {
    this.dataSourceType = dataSourceType;
  }

  public String getStorageGroup() {
    return storageGroup;
  }

  public void setStorageGroup(String storageGroup) {
    this.storageGroup = storageGroup;
  }

  public String getDataStorageFormat() {
    return dataStorageFormat;
  }

  public void setDataStorageFormat(String dataStorageFormat) {
    this.dataStorageFormat = dataStorageFormat;
  }

  public String getLogFormName() {
    if (StringUtils.isEmpty(super.logFormName)) {
      return "元数据编辑暂存表";
    } else {
      return super.logFormName;
    }
  }

  public String getLogTitle() {
    if (StringUtils.isEmpty(super.logTitle)) {
      return "元数据编辑暂存表";
    } else {
      return super.logTitle;
    }
  }
}
